﻿{% extends '../layout.html' %}
<!-- header-start -->
{% block head %}
{% parent %}
{% endblock %}
<!-- header-end -->

<!-- body-start -->
{% block content %}
<div style="margin:0px!important;">
    <div style="width:100%;height:800px;background:#57c334"></div>
    <div id="show" href="">点击显示模态框</div>
</div>
{% endblock %}
<!-- body-end -->
<!-- script-start -->
{% block script %}
<script>
    var winwidth,
        winheight,
        model = $("#model-bg"),
        close = $("#close"),
        show = $("#show");
    $(window).resize(function () {
        winwidth = $(window).width();
        winheight = $(window).height();
        model.width(winwidth).height(winheight);
    }).resize();

    var Model_Date = {
        "Success": [
            //model:success类型的是成功弹窗，error是错误弹窗
            {
                "id": "1",
                "model": 'success',
                "title": "绑定成功",
                "detail": "关联产品成功,您获得1220海贝",
                "content": "积分将在48小时内到账",
                "btn": "立即登录/注册",
                "href": "https://www.haier.com/",
                "btn": "立即登录/注册",
                "footer_content": "登录或注册,及时了解进度,享受会员权益"
            },
            {
                "id": "1", "model": 'success', "title": "是否解除权益", "btn": "是", "btn_false": "返回",
                "href": "https://www.haier.com/", "footer_content": "登录或注册,及时了解进度,享受会员权益"
            }
        ],
        "Error": [
            {
                "id": "1",
                "model": 'error',
                "title": "绑定失败",
                "detail": "测试文字",
                "detail": "关联产品失败",
                "content": "请重新关联",
                "href": "https://www.haier.com/",
                "btn": "关注",
                "footer_content": "关注海尔微信公众号获取更多权益"
            }
        ]
    }
    show.click(function () {
        // 新增../../js/base/common.js类库
        CommonJs.alert.show(Model_Date.Error[0]);
        model.css('top', $(document).scrollTop());
//            var alertStart=new CommonJs.alert.show({
//                "title": "",
//                "detail": "",
//                "content": ""
//            })
//            var close = $("#close");
//            var State = Model_Date.Success[0];//状态栏
//            var AddText = '<div class="model-bg" id="model-bg"><div class="model-box"><header><div class="Model_Ok"></div><h3>' + State.title + '</h3><div class="Model_Closed" id="close"></div></header><main><h4>' + State.detail + '</h4><p>' + State.detail2 + '</p></main><footer><a class="HrWx_GZ">关注</a><p>关注海尔微信公众号获取更多权益</p></footer></div></div>'
//            $("body").css("overflow", "hidden").append(AddText);
//
//            $("#close").click(function () {
//                $("body").css("overflow", "");
//                $("#model-bg").remove();
//            })
    })
</script>
{% endblock %}
<!-- script-end -->